﻿using System;
using System.Net;

namespace CnSharp.SSMS.Demo.CodeGen
{
    public class CodeInfo<T>
    {
        public CodeInfo()
        {
            Author = Dns.GetHostName();
            CreateDate = DateTime.Now.ToShortDateString();
            DbProvider = "system.data.sqlclient";
        }

        public CodeInfo(T t, string server, string db) : this()
        {
            Meta = t;
            Server = server;
            Database = db;
        }

        public T Meta { get; set; }
        public string Author { get; set; }
        public string CreateDate { get; set; }
        public string Copyright { get; set; }
        public string Server { get; set; }
        public string Database { get; set; }
        public string DbProvider { get; set; }
    }
}